<template>
  <el-row type="flex" justify="start" align="middle">
    <el-badge value="自定义" :hidden="hiddenBadge">
    </el-badge>
    <el-button type="text">{{ domain }}</el-button>
  </el-row>
</template>

<script>
export default {
  name: 'Domain',
  props: {
    row: {
      type: Object,
      default: _ => {
        return {};
      }
    }
  },
  computed: {
    hiddenBadge() {
      return this.row.node !== 2
    },
    domain() {
      return this.row.node === 2 ? this.row.domain : this.row.sub_domain
    }
  }
}

</script>

<style scoped lang="scss">
.el-badge{
  margin-top: 12px;
}
</style>
